package com.sakiko.aspects_part2;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

// todo: aop_06
@Component
@Aspect
@Order(20) // 设置优先级
public class LogAspect {
    @Before("com.sakiko.pointcuts_part2.MyPointcut.pointcut06()")
    public void before(){
        System.out.println("LogAspect.before");
    }

    @After("com.sakiko.pointcuts_part2.MyPointcut.pointcut06()")
    public void after(){
        System.out.println("LogAspect.after");
    }
}
